package com.Lyyf.Service;

import com.Lyyf.Dao.FlowerMapper;
import com.Lyyf.Entity.Flower;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class FlowerServiceImpl implements FlowerService {
    @Autowired
    private FlowerMapper flowerMapper;
    @Override
    public List<Flower> SelectFlowerAll() {
        return flowerMapper.SelectFlowerAll();
    }

    @Override
    public List<Flower> SelectFlowerByName(String flowerName) {
        return flowerMapper.SelectFlowerByName(flowerName);
    }

    @Override
    public Flower SelectFlowerById(int flowerId) {
        return flowerMapper.SelectFlowerById(flowerId);
    }

    @Override
    public int UpdateFlower(Flower flower) {
        return flowerMapper.UpdateFlower(flower);
    }

    @Override
    public int DeleteFlower(int flowerId) {
        return flowerMapper.DeleteFlower(flowerId);
    }

    @Override
    public int InsertFlower(Flower flower) {
        return flowerMapper.InsertFlower(flower);
    }
}
